---
interface Props {
	sources: {
		src: string;
		type: 'video/mp4' | 'video/webm';
	}[];
}

const { sources } = Astro.props as Props;
---

<video autoplay loop muted playsinline>
	{sources.map(({ src, type }) => <source src={src} type={type} />)}
</video>
